package com.nevermiss.login;

import com.nevermiss.ctrl.CtrlServer;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.Button;
import android.widget.EditText;

public class LoginActivity extends Activity {
	Button loginBtn ;
	EditText phoneEt,pswEt;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_login);
		loginBtn = (Button)findViewById(R.id.loginin_btn);
		phoneEt = (EditText)findViewById(R.id.ID_et_login);
		pswEt = (EditText) findViewById(R.id.psw_et_login);
		Intent in = new Intent(this,CtrlServer.class);
		in.putExtra("phone",phoneEt.getText().toString().trim());
		in.putExtra("pass", pswEt.getText().toString().trim());
		startService(in);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.login, menu);
		return true;
	}

}
